feat(helper-text): port <pf-v5-helper-text> to <pf-v6-helper-text> element#3155
feat(helper-text): port <pf-v5-helper-text> to <pf-v6-helper-text> element#3155adamjohnson wants to merge 12 commits into
<pf-v5-helper-text> to <pf-v6-helper-text> element#3155Conversation
🦋 Changeset detectedLatest commit: 40c4af1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
<pf-v5-helper-text> to <pf-v6-helper-text> element
✅ Commitlint tests passed!More Info{
"valid": true,
"errors": [],
"warnings": [],
"input": "feat(helper-text): port `<pf-v5-helper-text>` to `<pf-v6-helper-text>` element"
} |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This comment has been minimized.
This comment has been minimized.
|
|
||
| | React prop | Notes | | ||
| | --- | --- | | ||
| | `HelperText` `component` (`'div'` \| `'ul'`) | Use a standard HTML `<div>` or `<ul>` wrapper instead. | |
There was a problem hiding this comment.
| | `HelperText` `component` (`'div'` \| `'ul'`) | Use a standard HTML `<div>` or `<ul>` wrapper instead. | | |
| | `HelperText` `component` (`'div'` \| `'ul'`) | Use a standard HTML `<ul>` wrapper if necessary. | |
There was a problem hiding this comment.
on second thought, let's just tell people to use a ul with some css.
rename multiple.html to multiple-items.html and have it use <ul><li> and some pf tokens for the spacing.
There was a problem hiding this comment.
<pf-v6-progress>
<ul slot="helper-text">
<li><pf-v6-helper-text>some texthow would that work if we implement #3152 (comment) (adding all elements in helper-text to ariaDescribedByElements on progress host). i.e. is ul allowed as a describedby element?
There was a problem hiding this comment.
@hellogreg NB: we'll need to test that this actually works with various SR vendors. We'll ping here when it's ready for testing
| | React prop | Notes | | ||
| | --- | --- | | ||
| | `HelperText` `component` (`'div'` \| `'ul'`) | Use a standard HTML `<div>` or `<ul>` wrapper instead. | | ||
| | `HelperText` `isLiveRegion` | Apply `role="status"` directly on a wrapper element. | |
There was a problem hiding this comment.
| | `HelperText` `isLiveRegion` | Apply `role="status"` directly on a wrapper element. | | |
| | `HelperText` `isLiveRegion` | Apply `role="status"` directly on the element, or a `<ul>` wrapper, if in use. | |
Summary
<pf-v5-helper-text><pf-v5-helper-text>to<pf-v6-helper-text>web component for PatternFly v6variant(default/indeterminate/warning/success/error),has-icon,dynamic, andscreen-reader-textattributes@patternfly/react-icons(rh-ui-minus, rh-ui-warning-fill, rh-ui-check-circle-fill, rh-ui-error-fill)light-dark()CSS fallbacksCloses #3012
Intentional divergences from React
HelperText(container) +HelperTextItem(item) pair; use plain HTML wrappers witharia-livefor groupinghas-iconattribute for opt-in icon display (React auto-shows icons for non-default variants)iconslot replaces React'siconprop (ReactNode → slotted markup)screen-reader-textattribute maps to React'sscreenReaderTextpropdynamicattribute exposes React's internal.pf-m-dynamicCSS modifier classcomponent,isLiveRegion,aria-label) not implemented; users apply these directly on wrapper elements<pf-v5-icon>— uses inline SVG iconsTest plan
npm run testpasseslocalhost:8000screen-reader-textoverrides default announcementscreen-reader-text=""suppresses announcementaria-livecontainer with mixed success/error itemsAssisted-By: Claude